
class ResponseStatus:
    USERINFO_ERROR=4001
    OPERATION_FAIL=4002
    PARAMETER_ERROR=4005
    RESPONSE_FAIL = 4004
    SUCESS = 2000
    METHOD_ERROR = 4003
    COMPLETE_RESPONSE = 2005

class ResponseData:
    JSON_CONTENT_TYPE='application/json;charset=utf-8'
    def __init__(self,success,responseCode,message='',data=[]):
        self.success=success
        self.code=responseCode
        self.message=message
        self.data=data
    def obj2json(self):
        return {
            "success":self.success,
            "code":self.code,
            "message":self.message,
            "data":self.data
        }
